<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    class Student {
      constructor(name, age, sno, score) {
        this.name = name
        this.age = age
        this.sno = sno
        this.score = score
      }
      running() {
        console.log("running~")
      }
      eating() {
        console.log("eating~")
      }
      studying() {
        console.log("studying~")
      }
    }
    class Teacher {
      constructor(name, age, title) {
        this.name = name
        this.age = age
        this.title = title
      }

      running() {
        console.log("running~")
      }
      eating() {
        console.log("eating~")
      }
      teaching() {
        console.log("teaching~")
      }
    }
  </script>

  <script>
    class Person {
      constructor(name, age) {
        this.name = name
        this.age = age
      }
      running() {
        console.log("running~")
      }
      eating() {
        console.log("eating~")
      }
    }
    class Student1 extends Person {
      constructor(name, age, sno, score) {
        super(name, age)
        this.sno = sno
        this.score = score
      }
      studying() {
        console.log("studying~")
      }
    }

    class Teacher1 extends Person {
      constructor(name, age, title) {
        super(name, age)
        this.title = title
      }
      teaching() {
        console.log("teaching~")
      }
    }

  </script>
</body>

</html>